package net.dodoman.passby;

public class Testit {
	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static void main(String[] args) {
		Testit a = new Testit();
		a.setName("a");
		Testit b = new Testit();
		b.setName("b");
		System.out
				.println("before swap: " + "a=" + a + " name: " + a.getName());
		swap(a, b);
	}

	private static void swap(Testit swap1, Testit swap2) {
		System.out.println("swaping: " + "a= " + swap1 + " name: "
				+ swap1.getName());
		Testit temp;
		temp = swap1;
		swap1 = swap2;
		swap2 = temp;
	}

}